package com.example.communitypro.mapper;

import com.example.communitypro.pojo.*;

import java.util.List;

public interface UserReportMapper {
    int insertUserReport(UserReport userReport);//新增用户举报
    //新增用户举报时根据举报对象类型同步改变帖子、评论、用户当前状态为审核中(1)
    int delectUserReport(int report_no); //删除用户举报
    List<UserInformation> getUserInformationReport(int user_no);//查找某用户举报的用户 √
    //report_object_type==0的;
    List<Post> getPostReport(int user_no);//查找某用户举报的帖子 √
    //report_object_type==1的;
    List<Comment> getCommentReport(int user_no);//查找某用户举报的评论 √
    //report_object_type==2的
    int UserReported(int user_no); //计算用户被举报次数 √
    int PostReported(int post_no); //计算帖子被举报次数 √
    int CommentReported(int comment_no); //计算评论被举报次数 √
    UserReport judgeReport(int user_no,int report_object_no,int report_object_type); //判断是否举报过
    List<UserReport> getUserReport(int no,int report_object_type);

    int deleteTypeReport(int no , int report_object_type);

    /**
     * lsl
     */
    int countByDate(String date);

    /**
     *系统自动生成
     */
    int deleteByPrimaryKey(Integer reportNo);

    int insert(UserReport record);

    int insertSelective(UserReport record);

    UserReport selectByPrimaryKey(Integer reportNo);

    int updateByPrimaryKeySelective(UserReport record);

    int updateByPrimaryKey(UserReport record);

    /**
     *
     * @return
     */
    int updateRejectReasonByReportNo(Integer reportNo,String rejectReason);

    List<UserReport> findAllReport();
    List<UserReport> findReportByReject();
}
